home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
dev
/
gcc
/
ixemsdk.lha
/
man
/
cat3
/
setreuid.0
< prev
next >
Wrap
Text File
|
1996-09-02
|
2KB
|
44 lines
SETREUID(3) UNIX Programmer's Manual SETREUID(3)
NNAAMMEE
sseettrreeuuiidd - set real and effective user ID's
SSYYNNOOPPSSIISS
##iinncclluuddee <<uunniissttdd..hh>>
_i_n_t
sseettrreeuuiidd(_i_n_t _r_u_i_d, _i_n_t _e_u_i_d)
DDEESSCCRRIIPPTTIIOONN
The real and effective user ID's of the current process are set according
to the arguments. If _r_u_i_d or _e_u_i_d is -1, the current uid is filled in by
the system. Unprivileged users may change the real user ID to the effec-
tive user ID and vice-versa; only the super-user may make other changes.
The sseettrreeuuiidd() function has been used to swap the real and effective user
IDs in set-user-ID programs to temporarily relinquish the set-user-ID
value. This purpose is now better served by the use of the sseetteeuuiidd()
function (see setuid(2)).
When setting the real and effective user IDs to the same value, the stan-
dard sseettuuiidd() function is preferred.
RREETTUURRNN VVAALLUUEESS
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and _e_r_r_n_o is set to indicate the error.
EERRRROORRSS
[EPERM] The current process is not the super-user and a change oth-
er than changing the effective user-id to the real user-id
was specified.
SSEEEE AALLSSOO
getuid(2), seteuid(2), setuid(2)
HHIISSTTOORRYY
The sseettrreeuuiidd() function call appeared in 4.2BSD and was dropped in
4.4BSD.
4th Berkeley Distribution March 10, 1991 1